//
//  SCCAShaAndMD.h
//  SCCAMobileshield
//
//  Created by cyptt on 2018/9/6.
//  Copyright © 2018年 com.qingtiantree. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface CHCrypto : NSObject

/*
 base64 encode
 */
+ (NSString *)base64Encode:(NSString *)string;

/*
 base64 decode
 */
+ (NSString *)base64Decode:(NSString *)base64String;

/*
 字符串转sha1
 */
+ (NSString *) sha1String:(NSString *)input;


/*
 sha1 专程base64 字符串
 改方法将字符串专成为btyes 然后将bytes转成data，data再base64处理
 */
+(NSString*)sha1Base64String:(NSString *)input;

/*
 data 转sha1
 */
+ (NSData *) sha1Data:(NSData*)data;

/*
 hmac  sha1
 */
+ (NSString *)hmacSha1:(NSString*)key text:(NSString*)textS;

/*
 转md5
 */
+ (NSString *)md5:(NSString *)str;


/*
 16位md5
 */
+ (NSString *)MD5ForUpper16Bate:(NSString *)str;


@end
